home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Compilers⁄Interps / Harvest C / Source Code / Lexer.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-01-02  |  2.2 KB  |  104 lines  |  [TEXT/ALFA]

  1. /*
  2.  * Harvest C
  3.  * 
  4.  * Copyright 1991 Eric W. Sink   All rights reserved.
  5.  * 
  6.  * This file contains the lexical analyzer and preprocessor for Harvest C. The
  7.  * preprocessor is not implemented as a separate stage, but as layers within
  8.  * the lexer.
  9.  * 
  10.  * 
  11.  */
  12.  
  13. #ifndef Lexer_INTERFACE
  14. #define Lexer_INTERFACE
  15.  
  16.  
  17. /* Parser token codes... */
  18. /*
  19.  * Note : At this time, the parser token codes are being left as integer
  20.  * defines, not an enum.  The reason for this is that the tokens must be able
  21.  * to include the values for the single character C tokens, which ARE handled
  22.  * as single characters, for readability.
  23.  */
  24. #define IDENTIFIER 257
  25. #define FLOATCONSTANT 329
  26. #define INTCONSTANT 258
  27. #define CHARCONSTANT 330
  28. #define STRING_LITERAL 259
  29. #define SIZEOF 260
  30. #define PTR_OP 261
  31. #define INC_OP 262
  32. #define DEC_OP 263
  33. #define LEFT_OP 264
  34. #define RIGHT_OP 265
  35. #define LE_OP 266
  36. #define GE_OP 267
  37. #define EQ_OP 268
  38. #define NE_OP 269
  39. #define AND_OP 270
  40. #define OR_OP 271
  41. #define MUL_ASSIGN 272
  42. #define DIV_ASSIGN 273
  43. #define MOD_ASSIGN 274
  44. #define ADD_ASSIGN 275
  45. #define SUB_ASSIGN 276
  46. #define LEFT_ASSIGN 277
  47. #define RIGHT_ASSIGN 278
  48. #define AND_ASSIGN 279
  49. #define XOR_ASSIGN 280
  50. #define OR_ASSIGN 281
  51. #define TYPEDEF_NAME 282
  52. #define TYPEDEF 283
  53. #define EXTERN 284
  54. #define STATIC 285
  55. #define AUTO 286
  56. #define REGISTER 287
  57. #define CHAR 288
  58. #define SHORT 289
  59. #define INT 290
  60. #define LONG 291
  61. #define SIGNED 292
  62. #define UNSIGNED 293
  63. #define FLOAT 294
  64. #define DOUBLE 295
  65. #define CONST 296
  66. #define VOLATILE 297
  67. #define VOID 298
  68. #define STRUCT 299
  69. #define UNION 300
  70. #define ENUM 301
  71. #define ELIPSIS 302
  72. #define RANGE 303
  73. #define CASE 304
  74. #define DEFAULT 305
  75. #define IF 306
  76. #define ELSE 307
  77. #define SWITCH 308
  78. #define WHILE 309
  79. #define DO 310
  80. #define FOR 311
  81. #define GOTO 312
  82. #define CONTINUE 313
  83. #define BREAK 314
  84. #define RETURN 315
  85. #define PASCAL 316
  86. #define INLINE 317
  87. #define ELLIPSIS 328
  88. #define ASM 318
  89. #define PASCSTRING_LITERAL 319
  90. #define DEFINED 400
  91. /* DEFINED is a strange token - see ecc.c comments for details. */
  92. /* Key words for Object oriented extensions */
  93. #define atINTERFACE 500
  94. #define atIMPLEMENTATION 501
  95. #define atEND 502
  96. #define atSELECTOR 503
  97. #define atDEFS 504
  98. #define atENCODE 505
  99. #define atPUBLIC 506
  100. #define EXTENDED 507
  101. #define COMP 508
  102.  
  103. #endif
  104.